/**
 * Class, describing teacher
 * 
 * @param name
 *            Teacher's name
 * @param phoneNumber
 *            His phone number
 * @param academicDegree
 *            Represents Teacher's academic degree
 * @param teacherSubject
 *            Represents the subject, the teacher is teaching
 * @author Timur Suleimanov
 */
public class Teacher extends Person {
	private String academicDegree;
	private Subject teacherSubject;

	public Teacher(String name, String phoneNumber, String academicDegree,
			Subject teacherSubject) {
		super(name, phoneNumber);
		this.academicDegree = academicDegree;
		this.teacherSubject = teacherSubject;
	}

	/**
	 * Displays exam shedule
	 * 
	 * @param subject
	 *            academic discipline
	 */
	public void printExamShedule(Subject subject[]) {
		System.out.println("Exam shedule:");
		for (Subject exam : subject)
			System.out.printf("%1s, subject name: %2s ,Date: %3s\n",
					this.getName(), exam.getSubjectName(), exam.getExamDate());
	}

	public String getDescription() {
		return String
				.format("Teacher's name= %1s ,Subject- %2s ,Phone number= %3s ,Academic degree- %4s",
						this.getName(), this.getTeacherSubject(),
						this.getPhoneNumber(), this.getAcademicDegree());
	}

	public String getAcademicDegree() {
		return academicDegree;
	}

	public String getTeacherSubject() {
		return teacherSubject.getSubjectName();
	}

	public String setAcademicDegree(String academicDegree) {
		return this.academicDegree = academicDegree;
	}
}
